Makefile && subdir template

SUBDIR = sub-dir

all:
    cd ${SUBDIR} && $(MAKE)

clean:

    cd ${SUBDIR} && $(MAKE)




===============================================


CFLAGS += -g -DDEBUG -I../shared -DLINUX_X86

LDLIBS = -lpthread -lrt

.PHONY: all clean


target: 1.o 2.o 3.o 4.o


1.o:1.c 1.h

$(CC)  -c $(CFLAGS) 1.c


clean:

-$(RM)  *.o

-$(RM) $(target)





發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章