summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 873fb1b30bba3414f993c659e1f181d7f4f4612f (plain)
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
CC	= gcc
CWARN	= -W -Wall
COPT	= -g -O2
CREQ	=
CFLAGS	= $(CWARN) $(COPT) $(CREQ)
LDFLAGS	=
LIBS	=
X	=
O	= o

.SUFFIXES: .c .$(O) .S .s .i

.c.$(O):
	$(CC) $(CFLAGS) -c -o $@ $<
.c.s:
	$(CC) $(CFLAGS) -S -o $@ $<
.c.i:
	$(CC) $(CFLAGS) -E -o $@ $<
.S.$(O):
	$(CC) $(CFLAGS) -c -o $@ $<
.S.s:
	$(CC) $(CFLAGS) -E -o $@ $<

all: ipxrelay$(X)

ipxrelay$(X): ipxrelay.$(O)
	$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)

clean:
	rm -f ipxrelay$(X) *.$(O)

spotless: clean
	rm -f *~ \#*

win32:
	$(MAKE) CC=i686-pc-mingw32-gcc LIBS=-lws2_32 X=.exe O=obj all