File: Makefile

package info (click to toggle)
uthash 2.3.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,788 kB
  • sloc: ansic: 9,838; makefile: 178; perl: 88; sh: 37; cpp: 30
file content (31 lines) | stat: -rw-r--r-- 650 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
27
28
29
30
31
HASHDIR = ../../src
PROGS = test1 test2

# Thread support requires compiler-specific options
# ----------------------------------------------------------------------------
# GNU
CFLAGS += -I$(HASHDIR) -g -pthread
# Solaris (Studio 11)
#CFLAGS = -I$(HASHDIR) -g -mt
# ----------------------------------------------------------------------------

ifeq ($(HASH_DEBUG),1)
CFLAGS += -DHASH_DEBUG=1
endif

all: $(PROGS) run_tests

$(PROGS) : $(HASHDIR)/uthash.h
	$(CC) $(CPPLFAGS) $(CFLAGS) $(LDFLAGS) -o $@ $(@).c

debug:
	$(MAKE) all HASH_DEBUG=1

run_tests: $(PROGS)
	perl ../do_tests

.PHONY: clean

clean:
	rm -f $(PROGS) test*.out
	rm -rf test*.dSYM