Update README.md
[puttycyg-ng.git] / windows / cthelper / Makefile
blobc83ed8cfc3dfc4be1b7928ac0ff44c5b53b53024
1 TARGET_ARCH = -mcygwin
2 LINK = $(CC)
3 CFLAGS = $(DBUG_CFLAGS) $(DEFINES) $(INCLUDE) $(PLATFORM)
4 DEFINES = $(DBUG_DEFINES)
5 INCLUDE = $(DBUG_INCLUDE)
6 LDFLAGS = -s $(DBUG_LDFLAGS)
7 q = @echo $@;
9 ifdef DEBUG
10 DBUG = /usr/local
11 #DBUG = /home/dbug
12 #DBUG = .
13 DBUG_CFLAGS = -g
14 DBUG_DEFINES = -DDEBUG -DDEBUG_CHILD
15 DBUG_INCLUDE = -I$(DBUG)/include
16 DBUG_LDFLAGS = -L$(DBUG)/lib
17 DBUG_OBJ = dump.o
18 LDLIBS = -ldbug
19 else
20 DBUG_DEFINES = -DDBUG_OFF
21 endif
23 ## SFU (INTERIX) needs these also
24 ifdef INTERIX
25 APUE_OBJ = ptyfork.o ptyopen.o error.o
26 endif
28 SRC = cthelper.c buffer.c buffer.h dump.c debug.h
29 OBJ = cthelper.o buffer.o message.o $(APUE_OBJ) $(DBUG_OBJ)
31 default: all
32 all: cthelper.exe
34 cthelper.exe: $(OBJ)
35 $(q) $(LINK) $(LDFLAGS) -o $@ $(OBJ) $(LDLIBS)
36 cthelper.o: cthelper.c cthelper.h ptyfork.h buffer.h debug.h
37 buffer.o: buffer.c buffer.h debug.h
38 message.o: message.c message.h debug.h
39 .c.o:; $(q) $(CC) $(CFLAGS) -o $@ -c $*.c
41 checkin: Makefile $(SRC)
42 ci -l $^
44 TAGS: $(SRC)
45 ctags $^
46 clean:
47 rm -f *.o *.exe *~ *.stackdump *core tags