CC=gccCPPFLAGS=CFLAGS=-O2 -pipeLDFLAGS=-sPREFIX=/usrall : prog1 prog2prog1 : prog1.o $(CC) $(LDFLAGS) -o prog1 prog1.oprog1.o : prog1.c $(CC) -c $(CFLAGS) prog1.cprog2 : prog2.o $(CC) $(CFLAGS) $(LDFLAGS) -o prog2 prog2.oprog2.o : prog2.c $(CC) -c $(CPPFLAGS) $(CFLAGS) prog2.cclean : rm -f *.{o,a} prog{1,2}install : prog1 prog2 if ( test ! -d $(PREFIX)/bin ) ; then mkdir -p $(PREFIX)/bin ; fi cp -f prog1 $(PREFIX)/bin/prog1 cp -f prog2 $(PREFIX)/bin/prog2check test : prog1 prog2 prog1 < sample1.ref > sample1.rz prog1 < sample2.ref > sample3.rz cmp sample1.ok sample1.rz cmp sample2.ok sample2.rz
联系客服