Merge 14981:15268 from trunk
[reactos.git] / rosapps / cmdutils / makefile
1 #
2 # ReactOS cmdutils makefile
3 #
4
5 PATH_TO_TOP=..
6
7 TARGET=find.exe more.exe sort.exe tee.exe y.exe
8
9 all: $(TARGET)
10
11
12 CLEAN_FILES = *.o *.exe *.sym *.coff
13
14 find.exe: find.o find.coff
15 $(CC) find.o -lkernel32 -lmsvcrt -o find.exe find.coff
16 $(NM) --numeric-sort find.exe > find.sym
17
18 more.exe: more.o more.coff
19 $(CC) more.o -lkernel32 -lmsvcrt -o more.exe more.coff
20 $(NM) --numeric-sort more.exe > more.sym
21
22 sort.exe: sort.o sort.coff
23 $(CC) sort.o -lkernel32 -lmsvcrt -o sort.exe sort.coff
24 $(NM) --numeric-sort sort.exe > sort.sym
25
26 tee.exe: tee.o tee.coff
27 $(CC) tee.o -lkernel32 -lmsvcrt -o tee.exe tee.coff
28 $(NM) --numeric-sort tee.exe > tee.sym
29
30 y.exe: y.o y.coff
31 $(CC) y.o -lkernel32 -lmsvcrt -o y.exe y.coff
32 $(NM) --numeric-sort y.exe > y.sym
33
34 install:
35
36 .phony: install
37
38
39 clean: $(CLEAN_FILES:%=%_clean)
40
41 $(CLEAN_FILES:%=%_clean): %_clean:
42 - $(RM) $*
43
44 .phony: clean $(CLEAN_FILES:%=%_clean)
45
46
47 floppy: $(TARGET:%=$(FLOPPY_DIR)/apps/%)
48
49 $(TARGET:%=$(FLOPPY_DIR)/apps/%): $(FLOPPY_DIR)/apps/%: %
50 ifeq ($(DOSCLI),yes)
51 $(CP) $* $(FLOPPY_DIR)\apps\$*
52 else
53 $(CP) $* $(FLOPPY_DIR)/apps/$*
54 endif
55
56
57 dist: $(TARGET:%=$(PATH_TO_TOP)/$(DIST_DIR)/apps/%)
58
59 $(TARGET:%=$(PATH_TO_TOP)/$(DIST_DIR)/apps/%): $(PATH_TO_TOP)/$(DIST_DIR)/apps/%: %
60 ifeq ($(DOSCLI),yes)
61 $(CP) $* $(PATH_TO_TOP)\$(DIST_DIR)\apps\$*
62 else
63 $(CP) $* $(PATH_TO_TOP)/$(DIST_DIR)/apps/$*
64 endif
65
66 include $(PATH_TO_TOP)/rules.mak
67