X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rln;a=blobdiff_plain;f=makefile;h=b70cc77a8388f68cbcfd0729a71eda4bfd4c38e4;hp=e784557287dae6fbee56df1d9bc33828ccde7ddb;hb=9ab479822c5e31c7cee4cad1496b562b42ee374b;hpb=7a68775424579a2e57843186afffb8e46b4314ad diff --git a/makefile b/makefile index e784557..b70cc77 100644 --- a/makefile +++ b/makefile @@ -1,42 +1,38 @@ +# # 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 - -OSTYPE := $(shell uname -a) - -ifeq "$(findstring Msys,$(OSTYPE))" "Msys" # Win32 - -OSDEFINE := WIN32 - -else # ??? - -OSDEFINE := __GCCUNIX__ - +# +RM =/bin/rm -f +CC = gcc +PROGNAME = rln +LIBS = +# +# Figure out which system we're compiling for, and set the appropriate +# variables +# +SYSTYPE := __GCCUNIX__ + +ifneq "$(CROSS)" "" +SYSTYPE := WIN32 +else +OSTYPE := $(shell uname -o) +ifeq "$(findstring Msys,$(OSTYPE))" "Msys" +SYSTYPE := WIN32 +endif endif - -# Change this to -DWIN32 for Windows :-) -#CFLAGS = -g -I. -D__GCCUNIX__ -#CFLAGS = -g -I. -DWIN32 -CFLAGS = -g -I. -D$(OSDEFINE) - +CFLAGS = -g -I. -D$(SYSTYPE) -O2 -Wno-format SRCS = rln.c - OBJS = rln.o .c.o: $(RM) $@ - $(CC) $(CFLAGS) -c $*.c + $(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) *~ + $(RM) $(OBJS) $(PROGNAME) $(PROGNAME).exe *~ +