#以前的一些makefile 意义不是很大 从这个开始吧
SRC_FILE=$(wildcard *.c)
HEAD_FILE=$(wildcard *.h)
objects := $(patsubst %.c,%.o,$(wildcard *.c))
TARGET:=test
export PATH+=/opt/toolchains/stbgcc-4.5.3-1.3/bin/
export PKG_CONFIG_PATH=/mnt/nv/lib/pkgconfig/
export ARCH=mipsel
export CROSS_COMPILE=mipsel-linux-
export CC=${CROSS_COMPILE}gcc
export CXX=${CROSS_COMPILE}g++
export AR=${CROSS_COMPILE}ar
export RANLIB=${CROSS_COMPILE}ranlib
export NM=${CROSS_COMPILE}nm
export AS=${CROSS_COMPILE}as
export LD=${CROSS_COMPILE}ld
INCLUDEDIR=-I/mnt/nv/include -I/mnt/nv/include/directfb
LIBS=-L/mnt/nv/lib -lz -lpng -ljpeg -lstdc++ -lsawman -lfusion -ldirectfb -ldirect -lpthread
CFLAGS=-o2
CFLAGS+=$(INCLUDEDIR)
all:$(objects)
$(CC) $(CFLAGS) $(INCLUDEDIR) -o $(TARGET) $(SRC_FILE) $(LIBS)
.PHONY:clean
clean:
-rm *.o $(TARGET)
SRC_FILE=$(wildcard *.c)
HEAD_FILE=$(wildcard *.h)
objects := $(patsubst %.c,%.o,$(wildcard *.c))
TARGET:=test
export PATH+=/opt/toolchains/stbgcc-4.5.3-1.3/bin/
export PKG_CONFIG_PATH=/mnt/nv/lib/pkgconfig/
export ARCH=mipsel
export CROSS_COMPILE=mipsel-linux-
export CC=${CROSS_COMPILE}gcc
export CXX=${CROSS_COMPILE}g++
export AR=${CROSS_COMPILE}ar
export RANLIB=${CROSS_COMPILE}ranlib
export NM=${CROSS_COMPILE}nm
export AS=${CROSS_COMPILE}as
export LD=${CROSS_COMPILE}ld
INCLUDEDIR=-I/mnt/nv/include -I/mnt/nv/include/directfb
LIBS=-L/mnt/nv/lib -lz -lpng -ljpeg -lstdc++ -lsawman -lfusion -ldirectfb -ldirect -lpthread
CFLAGS=-o2
CFLAGS+=$(INCLUDEDIR)
all:$(objects)
$(CC) $(CFLAGS) $(INCLUDEDIR) -o $(TARGET) $(SRC_FILE) $(LIBS)
.PHONY:clean
clean:
-rm *.o $(TARGET)