Renamed pseudo target 'floppy' to 'install'
[reactos.git] / reactos / lib / fmifs / makefile
1 # $Id: makefile,v 1.8 2000/08/11 12:31:37 ekohl Exp $
2 #
3 # Makefile for fmifs.dll
4 #
5 TARGET=fmifs
6 ifneq ($(HOST),mingw32-windows)
7 ifneq ($(HOST),mingw32-linux)
8 DLLTARGET=$(TARGET).a
9 else
10 DLLTARGET=$(TARGET).dll
11 endif
12 else
13 DLLTARGET=$(TARGET).dll
14 endif
15
16 BASE_CFLAGS = -I../../include
17
18 all: $(DLLTARGET)
19
20 IFS_OBJECTS = chkdsk.o compress.o diskcopy.o extend.o \
21 format.o init.o label.o media.o
22
23 MISC_OBJECTS = dllmain.o $(TARGET).coff
24
25 OBJECTS = $(IFS_OBJECTS) $(MISC_OBJECTS)
26
27 CLEAN_FILES = *.o *.a *.tmp *.dll *.sym *.coff
28
29 $(TARGET).coff: $(TARGET).rc ../../include/reactos/resource.h
30
31 $(TARGET).a: $(OBJECTS)
32 $(AR) csr $(TARGET).a $(OBJECTS)
33
34 $(TARGET).dll: $(DLLMAIN) $(OBJECTS) $(TARGET).def
35 $(LD) -r $(OBJECTS) -o $(TARGET).o
36 $(DLLTOOL) \
37 --dllname $(TARGET).dll \
38 --def $(TARGET).def \
39 --kill-at \
40 --output-lib $(TARGET).a
41 $(CC) \
42 -specs=$(TARGET)_specs \
43 -mdll \
44 -o junk.tmp \
45 -Wl,--base-file,base.tmp \
46 $(TARGET).o
47 - $(RM) junk.tmp
48 $(DLLTOOL) \
49 --dllname $(TARGET).dll \
50 --base-file base.tmp \
51 --output-exp temp.exp \
52 --def $(TARGET).edf
53 - $(RM) base.tmp
54 $(CC) \
55 -specs=$(TARGET)_specs \
56 -mdll \
57 -o $(TARGET).dll \
58 $(TARGET).o \
59 -Wl,--image-base,0x70000000 \
60 -Wl,--file-alignment,0x1000 \
61 -Wl,--section-alignment,0x1000 \
62 -Wl,temp.exp
63 - $(RM) temp.exp
64 $(NM) --numeric-sort $(TARGET).dll > $(TARGET).sym
65
66 clean: $(CLEAN_FILES:%=%_clean)
67
68 $(CLEAN_FILES:%=%_clean): %_clean:
69 - $(RM) $*
70
71 .PHONY: clean $(CLEAN_FILES:%=%_clean)
72
73 install: $(FLOPPY_DIR)/dlls/$(TARGET).dll
74
75 $(FLOPPY_DIR)/dlls/$(TARGET).dll: $(TARGET).dll
76 ifeq ($(DOSCLI),yes)
77 $(CP) $(TARGET).dll $(FLOPPY_DIR)\dlls\$(TARGET).dll
78 else
79 $(CP) $(TARGET).dll $(FLOPPY_DIR)/dlls/$(TARGET).dll
80 endif
81
82 dist: $(DIST_DIR)/dlls/$(TARGET).dll
83
84 $(DIST_DIR)/dlls/$(TARGET).dll: $(TARGET).dll
85 ifeq ($(DOSCLI),yes)
86 $(CP) $(TARGET).dll ..\..\$(DIST_DIR)\dlls\$(TARGET).dll
87 else
88 $(CP) $(TARGET).dll ../../$(DIST_DIR)/dlls/$(TARGET).dll
89 endif
90
91 include ../../rules.mak
92
93 # EOF