Make file Sample

农永宁
2023-12-01
target ... : prerequisites ... 
            command 


command:
make - 
make clean - 






# Makefile for items in /home/stanw/csci3550


CPGMS = \
recv0 \
send0 \
recv1 \
send1


JCLASSES = \
send0.class \
recv0.class \
send1.class \
st.class # and others


CC = gcc


I = include


LIB = lib/netlib.a


CFLAGS = -I$(I) -O2 -Wall


all: ${CPGMS} ${JCLASSES}


recv0: recv0.c $(I)/netlib.h
$(CC) $(CFLAGS) $< $(LIB) -o recv0


send0: send0.c $(I)/netlib.h
$(CC) $(CFLAGS) $< $(LIB) -o send0


recv1: recv1.c $(I)/netlib.h
$(CC) $(CFLAGS) $< $(LIB) -o recv1


send1: send1.c $(I)/netlib.h
$(CC) $(CFLAGS) $< $(LIB) -o send1


send0.class: send0.java
javac send0.java


recv0.class: recv0.java
javac recv0.java


send1.class: send1.java
javac send1.java


st.class: st.java # warnings expected
javac st.java


clean:
rm -f $(CPGMS) *.class
 类似资料:

相关阅读

相关文章

相关问答