all: test_script

CFLAGS_DBG = -g -Wall
include ../Makefile.conf

# $(FUNGWBIND_SRCLIBA) contains all static linkable script languages.
# Linking them all is suboptimal for a real application because:
#  - it hardwires language support to whatever is available at the time the
#    app is compiled
#  - it brings in a lot of unnecessary dependencies, e.g. if you use lua only
#    but you had python available at app compialtion time, every time you
#    start the app it will dynamic link python as well
#
# We use this suboptimal method here because it's just a quick example and
# this makes it easier to change scripting languages while keeping the build
# simple. There are other exmaples further down that demonstrate different
# build/link strategies.

test_script: test_script.o
	$(CC) -o test_script test_script.o $(LDFLAGS) $(LIB_FGW) $(LDLIBS) $(FUNGWBIND_SRCLIBA)

test_script.o: test_script.c
	$(CC) -c $(CFLAGS) $(CFLAGS_DBG) -o test_script.o test_script.c

clean:
	-rm test_script test_script.o 2>/dev/null
