Harald Welte | 27f9c4a | 2015-08-30 22:47:18 +0200 | [diff] [blame] | 1 | ASN1_ROOT=../asn1/ |
Harald Welte | 27f9c4a | 2015-08-30 22:47:18 +0200 | [diff] [blame] | 2 | ASN1_FILES=HNBAP-CommonDataTypes.asn |
Harald Welte | b3dae30 | 2015-08-30 12:20:09 +0200 | [diff] [blame] | 3 | |
Harald Welte | 27f9c4a | 2015-08-30 22:47:18 +0200 | [diff] [blame] | 4 | ASN1TOSTRUCT:=$(ASN1_ROOT)/utils/asn1tostruct.py |
| 5 | #ASN1_SRCS:=$(patsubst |
| 6 | |
Harald Welte | 08de638 | 2015-08-31 09:54:45 +0200 | [diff] [blame] | 7 | CFLAGS=-g -Wall `pkg-config --cflags libosmocore libosmovty libosmogsm libasn1c` -Iasn1c/ |
| 8 | LDFLAGS=`pkg-config --libs libosmocore libosmovty libosmogsm libasn1c` -lsctp |
Harald Welte | b3dae30 | 2015-08-30 12:20:09 +0200 | [diff] [blame] | 9 | |
Harald Welte | b90c37d | 2015-09-10 10:26:09 +0200 | [diff] [blame^] | 10 | RANAP_OBJS=ranap/libosmo-asn1-ranap.a #ranap_encoder.o ranap_decoder.o |
| 11 | RUA_OBJS=rua/libosmo-asn1-rua.a #rua_encoder.o rua_decoder.o |
| 12 | |
Harald Welte | b3dae30 | 2015-08-30 12:20:09 +0200 | [diff] [blame] | 13 | all: hnbgw |
| 14 | |
Harald Welte | 27f9c4a | 2015-08-30 22:47:18 +0200 | [diff] [blame] | 15 | .PHONY: hnbap_encoder.c |
Harald Welte | 9da9697 | 2015-08-31 09:38:13 +0200 | [diff] [blame] | 16 | hnbap_encoder.c: $(ASN1_ROOT)/hnbap/HNBAP-PDU-Contents.asn |
| 17 | $(ASN1TOSTRUCT) -f $< |
| 18 | |
| 19 | .PHONY: rua_encoder.c |
| 20 | rua_encoder.c: $(ASN1_ROOT)/rua/RUA-PDU-Contents.asn |
| 21 | $(ASN1TOSTRUCT) -f $< |
| 22 | |
| 23 | .PHONY: ranap_encoder.c |
| 24 | ranap_encoder.c: $(ASN1_ROOT)/ranap/RANAP-PDU-Contents.asn |
Harald Welte | 27f9c4a | 2015-08-30 22:47:18 +0200 | [diff] [blame] | 25 | $(ASN1TOSTRUCT) -f $< |
| 26 | |
Harald Welte | b90c37d | 2015-09-10 10:26:09 +0200 | [diff] [blame^] | 27 | .PHONY: ranap_common.h |
| 28 | ranap_common.h: |
| 29 | for f in ranap/*.h; do echo "#include \"$f\""; done > ranap_common.h |
| 30 | |
| 31 | .PHONY: rua_common.h |
| 32 | rua_common.h: |
| 33 | for f in ranap/*.h; do echo "#include \"$f\""; done > rua_common.h |
| 34 | |
Harald Welte | 0bdea4d | 2015-08-30 23:13:06 +0200 | [diff] [blame] | 35 | asn1c/libosmo-asn1-hnbap.a: |
| 36 | $(MAKE) -C asn1c |
| 37 | |
Harald Welte | b90c37d | 2015-09-10 10:26:09 +0200 | [diff] [blame^] | 38 | rua/libosmo-asn1-rua.a: |
| 39 | $(MAKE) -C rua |
| 40 | |
| 41 | ranap/libosmo-asn1-ranap.a: |
| 42 | $(MAKE) -C ranap |
| 43 | |
| 44 | hnbgw: asn1helpers.o hnbap_common.o hnbap_encoder.o hnbap_decoder.o hnbgw.o hnbgw_hnbap.o asn1c/libosmo-asn1-hnbap.a $(RUA_OBJS) $(RANAP_OBJS) |
Harald Welte | b3dae30 | 2015-08-30 12:20:09 +0200 | [diff] [blame] | 45 | $(CC) $(LDFLAGS) -o $@ $^ |
| 46 | |
| 47 | %.o: %.c |
| 48 | $(CC) $(CFLAGS) -o $@ -c $^ |
| 49 | |
| 50 | clean: |
| 51 | @rm -f hmbgw *.o |