Initial commit
[amiga/OpenBoopsi.git] / common / Makefile
1 #
2 # $Id:$
3 #
4 # Copyright (C) 1999 by Matteo Cavalleri
5 #
6
7 include $(TOP)/config.mk
8
9 COMMON_OBJS = GetGadgetBox.o
10
11 all: $(GST) $(APP_STARTUP) $(COMMON_OBJS)
12
13 help-all:
14         @echo "This target compile the custom startup code and place it"
15         @echo "in the obj/ directory, create the GST (Global Symbol Table)"
16         @echo "for SAS/C users."
17         @echo
18
19 lib:
20         $(NOP)
21
22 help-lib:
23         @echo "This target does nothing."; echo
24
25 debug:
26         $(NOP)
27
28 help-debug:
29         @echo "This target does nothing."; echo
30
31 private:
32         $(NOP)
33
34 help-private:
35         @echo "This target does nothing."; echo
36
37 obj: $(APP_STARTUP)
38
39 help-obj:
40         @echo "This target compile the custom startup code and place it"
41         @echo "in the obj/ directory."
42         @echo
43
44 clean:
45         $(RM) $(APP_STARTUP) $(GST)
46
47 help-clean:
48         @echo "This target deletes the custom startup code object and the GST."
49         @echo
50
51 install:
52         $(NOP)
53
54 help-install:
55         @echo "This target does nothing."; echo
56
57
58 ###########################################################
59 # Compile custom startup code for applications
60 ###########################################################
61
62 $(APP_STARTUP): $(APP_STARTUP_SRC)
63         $(AS) $< $(TO) $@
64
65 ###########################################################
66 # Compile common objects
67 ###########################################################
68
69 $(COMMON_OBJS): %.o : %.c
70         $(CC) $< $(TO) $@ $(O_CFLAGS)
71
72
73 ###########################################################
74 # Make Global Symbol Table to speed up compiling
75 ###########################################################
76 #
77 # We must define some symbols here because defining them
78 # inside GST.c won't work as expected. (SAS/C bug?)
79 #
80 # NOTE: The GST file does not depend on any headers because
81 #       otherwise all objects would be remade each time you edit
82 #       one of the header files.
83 #
84
85 $(GST): GST.c
86         ifeq ($(strip $(COMPILER)),sc)
87                 $(CC) FROM gst.c MAKEGST $(GST) NOOBJNAME $(O_CFLAGS) \
88                  DEF=INTUI_V36_NAMES_ONLY DEF=__USE_SYSBASE \
89                  DEF=CLIB_ALIB_PROTOS_H
90         endif