# no-strict-aliasing is important - starting with gcc 4.1.1 code doesn't work without! # (problems are caused by type-punning w/o using union which is used widely here) FORCED_FLAGS=-fno-strict-aliasing -Wno-unused .SUFFIXES: .o .c .h .aisc #where to find the creator files AISC = ../MAKEBIN/aisc AISC_MKPT = ../MAKEBIN/aisc_mkpt GEN_INCLUDES = GENH/aisc.h GENH/aisc_com.h INCLUDE_INCLUDES = aisc_include.header GEN_SERVER_PROTO = GENH/aisc_server_proto.h S_GEN_SERVER_PROTO = GENC/aisc_server.c SERVER_OBJECTS = O/server.o O/struct_man.o O/aisc_extern.o GEN_SERVER_OBJECTS = GENC/aisc_global.o GENC/aisc_server.o GEN_SERVER_INCLUDES = C/aisc_server.h GEN_SERVER_EXTERN_PROTO = GENH/aisc_server_extern.h CLIENT_OBJECTS = O/client.o O/debug.o GEN_CLIENT_OBJECTS = GENC/aisc_debug_globals.o CLIENT_INCLUDES = C/client_privat.h C/client.h AISC_EXTERNALS = C/aisc_extern.c $(PRIVATE_SERVER_OBJECTS:.o=.c) IMPORT_PROTO = GENH/import_proto.h SERVER = server.a CLIENT = client.a AISC_SERVER_EXTERN = GENH/aisc_server_extern.aisc all: $(CLIENT) $(SERVER) pregenerate: $(GEN_INCLUDES) $(GEN_SERVER_PROTO) $(GEN_SERVER_OBJECTS:.o=.c) $(SERVER): $(SERVER_OBJECTS) $(GEN_SERVER_OBJECTS) $(PRIVATE_SERVER_OBJECTS) $(LINK_STATIC_LIB) $@ $^ $(CLIENT): $(CLIENT_OBJECTS) $(GEN_CLIENT_OBJECTS) $(LINK_STATIC_LIB) $@ $^ $(GEN_SERVER_OBJECTS) $(PRIVATE_SERVER_OBJECTS): \ $(GEN_INCLUDES) $(GEN_SERVER_PROTO) \ $(GEN_SERVER_EXTERN_PROTO) $(IMPORT_PROTO) \ $(GEN_SERVER_OBJECTS:.o=.c) \ $(PRIVATE_SERVER_OBJECTS:.o=.c) $(COMPILER) $(FORCED_FLAGS) -c -o $@ $(@:.o=.c) -IGENH -I. -IC -DAISC_SAVE_$(AISC_SAVE) $(GEN_CLIENT_OBJECTS): $(GEN_INCLUDES) $(GEN_CLIENT_OBJECTS:.o=.c) $(CLIENTCOMPILER) $(FORCED_FLAGS) -c -o $@ $(@:.o=.c) -IGENH -I. -IC O/%.o: C/%.c $(GEN_INCLUDES) $(CLIENT_INCLUDES) C/server.h $(COMPILER) $(FORCED_FLAGS) -c -o $@ $< -IGENH -I. -IC $(CLIENT_OBJECTS): $(CLIENT_OBJECTS:O/%.o=C/%.c) $(GEN_INCLUDES) $(CLIENT_INCLUDES) $(CLIENTCOMPILER) $(FORCED_FLAGS) -c -o $@ C/$(@F:.o=.c) -IGENH -I. -IC GENH/%.h: AISC/%.pa AISC/*.pa $(MAIN_SOURCE) $(INCLUDE_INCLUDES) $(AISC) $(AISC) $< $(MAIN_SOURCE) $@ GENC/%.c: AISC/%.pa AISC/*.pa $(MAIN_SOURCE) $(AISC_SERVER_EXTERN) $(AISC) $(AISC) $< $(MAIN_SOURCE) $@ $(AISC_SERVER_EXTERN) $(IMPORT_PROTO) $(IMPORT_PROTO): GENC/aisc_server.c echo $@ $(AISC_SERVER_EXTERN): $(AISC_EXTERNALS) rm -f $(AISC_SERVER_EXTERN) $(AISC_MKPT) -a $(AISC_EXTERNALS) >$@ $(GEN_SERVER_EXTERN_PROTO): $(AISC_EXTERNALS) rm -f $(GEN_SERVER_EXTERN_PROTO) $(AISC_MKPT) -C $(AISC_EXTERNALS) >$@ $(GEN_SERVER_PROTO): $(S_GEN_SERVER_PROTO) rm -f $@ $(AISC_MKPT) -C $(S_GEN_SERVER_PROTO) >$@ clean: rm -f *.[ao] rm -f */*.[ao] rm -f GENH/* rm -f GENC/* rm -f .depends .depends: $(MAKEDEPEND) C/*.c GENC/*.c -I GENH -I C -f- -w1 | grep -v ' /usr' | sed -e 's/^C/O/ig' > .depends_new $(ARBHOME)/SOURCE_TOOLS/mv_if_diff .depends_new .depends ifeq ($(AUTODEPENDS),1) include .depends endif