summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile20
1 files changed, 13 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index a7d65f4..873fb1b 100644
--- a/Makefile
+++ b/Makefile
@@ -4,27 +4,33 @@ COPT = -g -O2
CREQ =
CFLAGS = $(CWARN) $(COPT) $(CREQ)
LDFLAGS =
+LIBS =
+X =
+O = o
-.SUFFIXES: .c .o .S .s .i
+.SUFFIXES: .c .$(O) .S .s .i
-.c.o:
+.c.$(O):
$(CC) $(CFLAGS) -c -o $@ $<
.c.s:
$(CC) $(CFLAGS) -S -o $@ $<
.c.i:
$(CC) $(CFLAGS) -E -o $@ $<
-.S.o:
+.S.$(O):
$(CC) $(CFLAGS) -c -o $@ $<
.S.s:
$(CC) $(CFLAGS) -E -o $@ $<
-all: ipxrelay
+all: ipxrelay$(X)
-ipxrelay: ipxrelay.o
- $(CC) $(LDFLAGS) -o $@ $^
+ipxrelay$(X): ipxrelay.$(O)
+ $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
clean:
- rm -f ipxrelay *.o
+ rm -f ipxrelay$(X) *.$(O)
spotless: clean
rm -f *~ \#*
+
+win32:
+ $(MAKE) CC=i686-pc-mingw32-gcc LIBS=-lws2_32 X=.exe O=obj all