-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
30 lines (25 loc) · 878 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
CFLAGS:=$(shell ../user/U2-CFlags)
LIBS= $(shell ../user/U2-Libs)
CC= gcc $(CFLAGS)
USER= $(shell ../user/U2-Dir)
DEPS= $(USER)/*.cpp
DEPH= $(USER)/*.h
OBJS= ship.o viewport.o planet.o game.o troop.o shot.o
ALL= Makefile cosmos.h planet.h
TSTR:= $(shell date +"%Y%m%d%H%M")
HDRS:= ship.h shipitem.h cosmos.h
TSTR:= $(shell date +"%Y%m%d%H%M")
all: cosmos
cosmos: cosmos.o $(OBJS) $(DEPS) $(DEPH) $(ALL)
make -C $(USER)
$(CC) -o cosmos cosmos.o $(OBJS) $(LIBS)
%.o: %.cpp $(HDRS) $(DEPH) $(ALL)
$(CC) -c $<
tar: cosmos.h
cd .. ; tar czhvf ~/c/archive/cosmos-pre$(TSTR).tar.gz cosmos
package: cosmos
cd .. ; tar chzvf ~/tar/cosmos-bin-pre$(TSTR).tar.gz \
cosmos/cosmos cosmos/*.tga cosmos/fonts cosmos/sounds \
cosmos/buildings cosmos/planets \
cosmos/graphics/deaths/dome cosmos/graphics/troops \
cosmos/graphics/explosions/boom10 cosmos/*.sav