File: Makefile

package info (click to toggle)
fungw 1.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,268 kB
  • sloc: ansic: 24,257; makefile: 500; sh: 32; awk: 9; perl: 8; tcl: 7; javascript: 7; ruby: 7; python: 6
file content (26 lines) | stat: -rw-r--r-- 1,022 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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