File: Makefile.linux

package info (click to toggle)
hivelytracker 0+git20180223-3
  • links: PTS
  • area: main
  • in suites: buster
  • size: 3,092 kB
  • sloc: ansic: 19,601; objc: 434; cpp: 175; makefile: 88
file content (41 lines) | stat: -rw-r--r-- 1,025 bytes parent folder | download | duplicates (2)
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
31
32
33
34
35
36
37
38
39
40
41

WRAPPERDIR := $(CURDIR)
BASEDIR = $(CURDIR)/..

CC = gcc

CFLAGS = -g -D__SDL_WRAPPER__

CFLAGS += -g $(shell PKG_CONFIG_PATH=/usr/$(BASELIBDIR)/pkgconfig pkg-config sdl --cflags) $(shell PKG_CONFIG_PATH=/usr/$(BASELIBDIR)/pkgconfig pkg-config gtk+-2.0 --cflags)
LFLAGS += -lm -L/usr/$(BASELIBDIR) $(shell PKG_CONFIG_PATH=/usr/$(BASELIBDIR)/pkgconfig pkg-config sdl --libs) $(shell PKG_CONFIG_PATH=/usr/$(BASELIBDIR)/pkgconfig pkg-config gtk+-2.0 --libs) -lSDL_image -lSDL_ttf -lfreetype -lz -lX11


CFLAGS += -I$(BASEDIR) \
          -I$(WRAPPERDIR) \
          -Ic:/mingw/include/SDL

TARGET = hivelytracker

OBJECTS = sdl_wrapper.o \
          ht.o \
	  linux.o \
	  ../gui.o \
	  ../replay.o \
	  ../util.o \
	  ../undo.o \
	  ../about.o

all: $(TARGET)

-include $(OBJECTS:.o=.d)

$(TARGET): $(OBJECTS)
	$(CC) -o $(TARGET) $(OBJECTS) $(LFLAGS)

$(OBJECTS): %.o: %.c
	$(CC) -c $(CFLAGS) $< -o $@
	@$(CC) -MM $(CFLAGS) $< > $*.d

clean:
	rm $(OBJECTS) $(OBJECTS:.o=.d) $(TARGET)