move work on clean rule
[reactos.git] / reactos / apps / utils / cabman / makefile
1 #
2 # Makefile for ReactOS Cabinet Manager
3 #
4 PATH_TO_TOP = ../..
5
6 ZLIB_OBJECTS = zlib/adler32.o zlib/deflate.o zlib/infblock.o zlib/infcodes.o \
7 zlib/inflate.o zlib/inftrees.o zlib/infutil.o zlib/inffast.o \
8 zlib/trees.o zlib/zutil.o
9 ENGINE_OBJECTS = $(ZLIB_OBJECTS) cabinet.o mszip.o raw.o
10 TEST_OBJECTS = $(ENGINE_OBJECTS) test.o
11 OBJECTS = $(ENGINE_OBJECTS) main.o dfp.o
12 TARGET = cabman
13 PROGS = $(TARGET).exe test.exe
14
15 CFLAGS += -O3
16
17 CLEAN_FILES = *.o zlib/*.o $(TARGET).exe $(TARGET).sym test.exe test.sym
18
19
20 all: $(PROGS)
21
22 clean:
23 - $(RM) $(CLEAN_FILES)
24
25 .phony: clean
26
27 install: $(PROGS:%=$(FLOPPY_DIR)/apps/%)
28
29 $(PROGS:%=$(FLOPPY_DIR)/apps/%): $(FLOPPY_DIR)/apps/%: %
30 ifeq ($(DOSCLI),yes)
31 $(CP) $* $(FLOPPY_DIR)\apps\$*
32 else
33 $(CP) $* $(FLOPPY_DIR)/apps/$*
34 endif
35
36 dist: $(PROGS:%=../../$(DIST_DIR)/apps/%)
37
38 $(PROGS:%=../../$(DIST_DIR)/apps/%): ../../$(DIST_DIR)/apps/%: %
39 ifeq ($(DOSCLI),yes)
40 $(CP) $* ..\..\$(DIST_DIR)\apps\$*
41 else
42 $(CP) $* ../../$(DIST_DIR)/apps/$*
43 endif
44
45 $(TARGET).exe: $(OBJECTS)
46 $(CC) $(OBJECTS) -o $(TARGET).exe
47 $(NM) --numeric-sort $(TARGET).exe > $(TARGET).sym
48
49 test.exe: $(TEST_OBJECTS)
50 $(CC) $(TEST_OBJECTS) -o test.exe
51 $(NM) --numeric-sort test.exe > test.sym
52
53 include ../../rules.mak
54