티스토리 뷰

프로그래밍/System

[UNIX] makefile

DEV LION 2014. 1. 3. 09:43
msh : libmsh.o msh_main.o 
 gcc -o msh libmsh.o msh_main.o 
libmsh.o : libmsh.c libmsh.h 
 gcc -c libmsh.c 
msh_main.o : libmsh.c libmsh.h 
 gcc -c msh_main.c 
clean: 
 rm *.o

 

Eaxmple

dstest : mylist.o myqueue.o member_info.o stock_reserv.o dstest_main.o 
 gcc -o dstest mylist.o myqueue.o member_info.o stock_reserv.o dstest_main.o 
mylist : mylist.c mylist.h 
 gcc -c dstest_main.c 
myqueue : myqueue.c myqueue.h 
 gcc -c myqueue.c 
member_info : member_info.c member_info.h 
 gcc -c member_info.c 
stock_reserv : stock_reserv.c stock_reserv.h 
 gcc -c stock_reserv.c 
dstest_main : dstest_main.c stock_reserv.h member_info.h myqueue.c mylist.h 
 gcc -c dstest_main.c 
clean :   
 rm *.o
반응형
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/12   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31
글 보관함