X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=gp2x%2FMakefile;h=9d281c11acbca466ae2562f219a7a830b41b7abb;hb=bbba320911a86c0ee373f8297f80a2b82de22039;hp=20964197516e9194c9aa460ba6bb6805c027a10b;hpb=d5e0983c10e0ca717603dd1a406ff0d6e450e905;p=gpsp.git diff --git a/gp2x/Makefile b/gp2x/Makefile index 2096419..9d281c1 100644 --- a/gp2x/Makefile +++ b/gp2x/Makefile @@ -4,7 +4,7 @@ # Global definitions -PREFIX = /opt/open2x/gcc-4.1.1-glibc-2.3.6 +PREFIX ?= /opt/open2x/gcc-4.1.1-glibc-2.3.6 CC = $(PREFIX)/bin/arm-open2x-linux-gcc STRIP = $(PREFIX)/bin/arm-open2x-linux-strip @@ -18,6 +18,8 @@ else BIN = gpsp_gp2x endif +-include Makefile.local + # Platform specific definitions VPATH += .. ../arm @@ -27,7 +29,7 @@ CFLAGS += -DWIZ_BUILD endif # NOTE: -funroll-loops will slow down compiling considerably CFLAGS += -O3 -std=c99 -msoft-float -funsigned-char -fno-common \ - -fno-builtin \ + -fno-builtin -Wall \ INCLUDES = `$(PREFIX)/bin/sdl-config --cflags` -I$(PREFIX)/include LIBS = `$(PREFIX)/bin/sdl-config --libs` \ @@ -40,6 +42,10 @@ endif .SUFFIXES: .c +all: $(BIN) + +cpu.o cpu_threaded.z: CFLAGS += -Wno-unused-variable -Wno-unused-label + %.z: %.c $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $< @@ -55,7 +61,7 @@ endif %.o: %.s $(CC) $(ASFLAGS) $(INCLUDES) -c -o $@ $< -all: $(OBJS) +$(BIN): $(OBJS) $(CC) $(OBJS) $(LIBS) -o $(BIN) $(STRIP) $(BIN)