Makefile (571B)
1 # File IO ++ 2 # "fileiopp" 3 # M. Yamanaka 4 # email: myamanaka@live.com 5 # website: http://www.csmyamanaka.com 6 # license: MIT (See included "LICENSE" file for details) 7 8 FILES=varbyterw.c bmpfileiopp.c 9 OBJS=varbyterw.o bmpfileiopp.o 10 TESTER=tester.c 11 CC=gcc 12 LK=ld 13 SOFILE=libfileiopp.so 14 OFILE=fileiopp.o 15 OUT=Tester 16 17 tester: tester.c fileiopp.o 18 $(CC) -o $(OUT) $^ 19 20 sofile: $(OBJS) 21 $(CC) -o $(SOFILE) -shared $(OBJS) 22 rm $(OBJS) 23 24 fileiopp.o: $(OBJS) 25 $(LK) -o $(OFILE) -i $(OBJS) 26 rm $(OBJS) 27 28 objects: $(FILES) 29 $(CC) -c $(FILES) 30 31 clean: 32 rm -f *.o *.so *.a *.out $(OUT) example*