From d63ca92d1684ce2604ef6b1128be7a8834474917 Mon Sep 17 00:00:00 2001 From: Xiangfu Liu Date: Sun, 30 May 2010 23:42:50 +0800 Subject: [PATCH] some cleanup of Makefile Signed-off-by: Xiangfu Liu --- Makefile | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 9aa53f9..1834523 100644 --- a/Makefile +++ b/Makefile @@ -1,30 +1,24 @@ ####### openwrt-xburst path BASEPATH = /home/fcarello/Projects/openwrt-xburst -TARGETPATH = /staging_dir/target-mipsel_uClibc-0.9.30.1 +TARGETPATH = $(BASEPATH)/staging_dir/target-mipsel_uClibc-0.9.30.1 ####### Compiler, tools and options CC = mipsel-openwrt-linux-uclibc-gcc -CXX = mipsel-openwrt-linux-uclibc-g++ STRIP = mipsel-openwrt-linux-uclibc-strip -DEFINES = CFLAGS = -pipe -O2 -fomit-frame-pointer -mips32 -mtune=mips32 -funit-at-a-time -fhonour-copts -msoft-float -Wall -W -D_REENTRANT $(DEFINES) -CXXFLAGS = -pipe -O2 -fomit-frame-pointer -mips32 -mtune=mips32 -funit-at-a-time -fhonour-copts -msoft-float -Wall -W -D_REENTRANT $(DEFINES) -INCPATH = -I$(BASEPATH)$(TARGETPATH)/usr/include/ -I$(BASEPATH)$(TARGETPATH)/usr/include/SDL -I. -LINK = g++ +INCPATH = -I$(TARGETPATH)/usr/include/ -I$(TARGETPATH)/usr/include/SDL -I. LFLAGS = -Wl,-O1 -LIBS = $(SUBLIBS) -L$(BASEPATH)$(TARGETPATH)/usr/lib/ -lSDL -lSDL_image -lSDL_gfx -ldirectfb -ldirect -lfusion -lz +LIBS = -L$(TARGETPATH)/usr/lib/ -lSDL -lSDL_image -lSDL_gfx -ldirectfb -ldirect -lfusion -lz SOURCE1 = sdl-imageviewer.c TARGET1 = imgv ####### Build rules -all: Clean Viewer - -Clean: - rm -f $(TARGET1) -Viewer: +all: $(CC) $(CFLAGS) $(INCPATH) $(SOURCE1) -o $(TARGET1) $(LIBS) $(STRIP) $(TARGET1) +clean: + rm -f $(TARGET1)