Updated prototypes.
[cake.git] / tools / genmodule / Makefile
blobacf143163a6ec3ed570c8912201f852d87699261
1 # Copyright © 2002, The AROS Development Team. All rights reserved.
2 # $Id$
4 # Desc: Makefile to create genmodule
7 USER_CFLAGS := -Wall -Wunused -O2
9 -include $(TOP)/config/make.cfg
10 include Makefile.deps
12 HOST_CC ?= gcc
13 HOST_STRIP ?= strip
14 MECHO ?= echo
15 HOST_CFLAGS ?= $(USER_CFLAGS)
16 GENMODULE ?= genmodule
18 all : $(GENMODULE)
20 GENMODULEINCLUDE := $(dir $(GENMODULE))/genmod_inc/aros/libcall.h
22 $(GENMODULE) : archspecific.h $(GENMODULE_DEPS) $(GENMODULEINCLUDE)
23 @$(MECHO) "Compiling $(notdir $@)..."
24 @$(HOST_CC) -g $(HOST_CFLAGS) -I$(GENINCDIR) $(GENMODULE_SRCS) -o $@
25 # @$(HOST_STRIP) $@
27 $(GENMODULEINCLUDE) : include/aros/libcall.h
28 @$(MKDIR) $(dir $@)
29 @$(CP) $< $@
31 archspecific.h: archspecific.c $(AROS_INCLUDES)/aros/$(AROS_TARGET_CPU)/cpu.h
32 @$(TARGET_CC) -S $<
33 @grep "^[/#][*d]" archspecific.s | sed s/@SED@[$$]*//g >$@
34 @rm archspecific.s
36 clean :
37 @$(RM) $(GENMODULE) $(GENMODULEINCLUDE)
39 .PHONY : all clean