File: Makefile

package info (click to toggle)
autogen 1%3A5.8.3-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 5,844 kB
  • ctags: 3,211
  • sloc: ansic: 20,577; sh: 15,284; makefile: 573; lisp: 70
file content (29 lines) | stat: -rw-r--r-- 809 bytes parent folder | download | duplicates (11)
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
27
28
29
# use autoopts-config to determine
# 1) the locatation autogen      (autoopts-config --autogen)
# 2) the data dir for autogen    (autoopts-config --pkgdatadir)
# 3) the include dir for autogen (autoopts-config --cflags)
# 4) the lib dir for autogen     (autoopts-config --libs)

AUTOGEN_PROGRAM=$(shell autoopts-config --autogen)
AUTOGEN_DATADIR=$(shell autoopts-config --pkgdatadir)
AUTOGEN_FLAGS=-L$(AUTOGEN_DATADIR)

AUTOGEN_CFLAGS=$(shell autoopts-config --cflags)
AUTOGEN_LDFLAGS=$(shell autoopts-config --libs)

CFLAGS+=$(AUTOGEN_CFLAGS) -DTEST_CHECK_OPTS
LDFLAGS+=$(AUTOGEN_LDFLAGS)

.PHONY: build
build: main

.PHONY: clean
clean:
	rm -f *.o main checkopt.c checkopt.h

main: checkopt.c main.c
checkopt.c checkopt.h: checkopt.def

# additional rules
%.c: %.def
	$(AUTOGEN_PROGRAM) $(AUTOGEN_FLAGS) $^