X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rln;a=blobdiff_plain;f=makefile;h=b70cc77a8388f68cbcfd0729a71eda4bfd4c38e4;hp=d49541a062f269417a2e07ac90b2f9baaa38d34f;hb=52963cddfc29b2981d549ff785c1a24d814f7290;hpb=ef2a73f70f65ceffe7bf93f15e074289fd488175 diff --git a/makefile b/makefile index d49541a..b70cc77 100644 --- a/makefile +++ b/makefile @@ -1,22 +1,38 @@ -rm=/bin/rm -f -CC= cc -PROGNAME= rln -LIBS= +# +# Makefile for Reboot's Linker for Jaguar +# +RM =/bin/rm -f +CC = gcc +PROGNAME = rln +LIBS = +# +# Figure out which system we're compiling for, and set the appropriate +# variables +# +SYSTYPE := __GCCUNIX__ -CFLAGS= -g -I. -D__GCCUNIX__ +ifneq "$(CROSS)" "" +SYSTYPE := WIN32 +else +OSTYPE := $(shell uname -o) +ifeq "$(findstring Msys,$(OSTYPE))" "Msys" +SYSTYPE := WIN32 +endif +endif +CFLAGS = -g -I. -D$(SYSTYPE) -O2 -Wno-format SRCS = rln.c - OBJS = rln.o .c.o: - $(rm) $@ - $(CC) $(CFLAGS) -c $*.c + $(RM) $@ + $(CROSS)$(CC) $(CFLAGS) -c $*.c all: $(PROGNAME) $(PROGNAME) : $(OBJS) - $(CC) $(CFLAGS) -o $(PROGNAME) $(OBJS) $(LIBS) + $(CROSS)$(CC) $(CFLAGS) -o $(PROGNAME) $(OBJS) $(LIBS) clean: - $(rm) $(OBJS) $(PROGNAME) core *~ + $(RM) $(OBJS) $(PROGNAME) $(PROGNAME).exe *~ +