forked from libav/c99-to-c89
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.w32
39 lines (30 loc) · 999 Bytes
/
Makefile.w32
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
32
33
34
35
36
37
38
39
EXT=.exe
all: c99conv$(EXT) c99wrap$(EXT)
CLANGDIR?=/home/rbultje/Projects/llvm-3.1.src
CC=cl.exe
# CLANGLIBS=$(CLANGDIR)/lib/libclang.lib
CLANGLIBS=$(CLANGDIR)/lib/c99-to-c89-libclang.lib
CFLAGS?=
CFLAGS+=-nologo -Z7 -D_CRT_SECURE_NO_WARNINGS=1 -Dpopen=_popen -Dunlink=_unlink -Dstrdup=_strdup -I. -I$(CLANGDIR)/include
LDFLAGS=-nologo -Z7 $(CLANGLIBS)
clean:
rm -f c99conv$(EXT) c99wrap$(EXT) convert.o compilewrap.o
rm -f unit.c.c unit2.c.c
test1: c99conv$(EXT)
$(CC) -P unit.c -Fiunit.prev.c
./c99conv unit.prev.c unit.post.c
diff -u unit.{prev,post}.c
test2: c99conv$(EXT)
$(CC) -P unit2.c -Fiunit2.prev.c
./c99conv unit2.prev.c unit2.post.c
diff -u unit2.{prev,post}.c
test3: c99conv$(EXT)
$(CC) $(CFLAGS) -P -Ficonvert.prev.c convert.c
./c99conv convert.prev.c convert.post.c
diff -u convert.{prev,post}.c
c99conv$(EXT): convert.o
$(CC) -Fe$@ $< $(LDFLAGS) $(LIBS)
c99wrap$(EXT): compilewrap.o
$(CC) -Fe$@ $< $(LDFLAGS) Shell32.lib
%.o: %.c
$(CC) $(CFLAGS) -Fo$@ -c $<