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